package com.jrx.anytxn.param.mapper.ext;

import com.jrx.anytxn.param.entity.TlBillTransCompareSummary;
import com.jrx.anytxn.param.mapper.base.TlBillTransCompareSummaryMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ExtTlBillTransCompareSummaryMapper extends TlBillTransCompareSummaryMapper {

    /**
     * 按照租户ID、业务日期查询账务汇总文件记录
     * @param businessDate
     * @return
     */
    TlBillTransCompareSummary selectByTenantIdAndBusDateAndTransType(@Param("tenantId") String tenantId,
                                                                     @Param("businessDate") Date businessDate,
                                                                     @Param("transType") String transType);

    /**
     * 保存
     * @param item
     * @return int
     */
    int insertbatch(List<TlBillTransCompareSummary> item);

    int countByTenantIdBusDateAndCompareStatus(@Param("tenantId") String tenantId,
                                               @Param("businessDate") Date businessDate,
                                               @Param("compareStatus") String compareStatus);

    int countByTenantIdBusDateAndCompareStatusAndThirdChannel(@Param("tenantId") String tenantId,
                                               @Param("businessDate") Date businessDate,
                                               @Param("compareStatus") String compareStatus,
                                               @Param("thirdChannel")String thirdChannel);

    /**
     * 根据业务日期删除
     * @param businessDate Date
     * @return int
     */
    int deleteByBusDate(@Param("businessDate") Date businessDate);
    /**
     * 根据业务日期删除
     * @param businessDate Date
     * @return int
     */
    int deleteByBusDateAndThirdChannel(@Param("businessDate") Date businessDate,@Param("thirdChannel")String thirdChannel);
}
